//
//  AboutVc.m
//  ainkjj
//
//  Created by zhiyiLiu on 2020/3/4.
//  Copyright © 2020 zhiyiLiu. All rights reserved.
//

#import "AboutVc.h"
#import "AppDelegate.h"
#import "Tuichu_quren_popView.h"
@interface AboutVc ()
@property (weak, nonatomic) IBOutlet UILabel *version_num_lb;
@property (weak, nonatomic) IBOutlet UILabel *ank_newVersion_status_lb;

@end

@implementation AboutVc
- (IBAction)quit_login:(UIButton *)sender {
    QMUIDialogViewController *dialogViewController = [[QMUIDialogViewController alloc] init];
    dialogViewController.title = @"退出登录";
    UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 100)];
    contentView.backgroundColor = UIColorWhite;
    UILabel *label = [[UILabel alloc] qmui_initWithFont:UIFontMake(14) textColor:UIColorBlack];
    label.text = [NSString stringWithFormat:@"是否退出当前登录账户"];
    [label sizeToFit];
    label.center = CGPointMake(CGRectGetWidth(contentView.bounds) / 2.0, CGRectGetHeight(contentView.bounds) / 2.0);
    [contentView addSubview:label];
    dialogViewController.contentView = contentView;
    [dialogViewController addSubmitButtonWithText:@"确定" block:^(QMUIDialogViewController *aDialogViewController) {
        [aDialogViewController hide];
        
        [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"login_or_not"];
        AppDelegate *delegate = [UIApplication sharedApplication].delegate;
        [delegate ank_switch_to_loginVc];
    }];
    [dialogViewController addCancelButtonWithText:@"取消" block:nil];
    
    [dialogViewController show];
    return;
    
//    MMPopupCompletionBlock btnBlock = ^(MMPopupView *popupView, BOOL finished){
//        
//        DLog(@"%d", finished);
//        if (finished) {
//
//            [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"login_or_not"];
//            AppDelegate *delegate = [UIApplication sharedApplication].delegate;
//            [delegate ank_switch_to_loginVc];
//
//        }
//    };
//    
//    Tuichu_quren_popView *pinView = [Tuichu_quren_popView new];
//    pinView.img_name = @"ad_remind_icon";
//    pinView.tipStr = @"是否退出当前登录账户";
//    pinView.btnBlock = btnBlock;
//    [pinView show];
    
    
}
- (IBAction)go_shop:(id)sender {
        /* TODO: #待完成#
         
         是根据设备来的
         */
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.title = @"关于";
    self.version_num_lb.text = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
    
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
